In the prior art such as mobile payment technology, for security purpose, the operating mode in a mobile device is classified into two modes: a normal mode and a secure mode. In the normal mode, the running environment of programs is generally a multi-media operating system, e.g., Android. In the secure mode, the running environment of programs is a closed, simple secure operating system. Programs in the normal mode have no access to resources in the secure mode, whereas programs in the normal mode can have access to all the software and hardware resources.
Typically, a device which is capable of running two operating systems such as a the mobile device is in the normal mode, i.e., in the multi-media operating system environment. When performing interaction of security-related information (e.g., entering the password of a bank card), the mobile device will be switched to the secure mode, i.e., to the secure operating system, and a secure program is initiated to perform processing of information. After the processing is completed, the mobile device is switched back to the normal mode so that a secure and reliable environment can be ensured for the user who is entering the password, thus preventing the password from being stolen by malware.
In the prior art, a solution shown in FIG. 1 is used to accomplish the processing of data stream from the normal mode to the secure mode. As shown, during communication between an application 1 and a shared apparatus, when it is required to process secure information, the application 1 will send a data message (e.g., information such as operation type and operation parameters) in a specified format to a secure application 1 via a communication framework interface layer; the secure application, after receiving the information and establishing communication with the shared apparatus, performs secure processing, and then returns the processing result to the application 1 via the communication framework interface.
In the above process, the secure application 1 requires to re-establish connection with the shared apparatus. That is, after corresponding information acquisition and operations on the shared apparatus by the application 1, the secure application 1 has to perform the same information acquisition and operations on the shared apparatus again, thus prolonging the processing time and decreasing response speed.
On the other hand, the processing result is returned to the application 1 via the communication framework interface and then sent to an external terminal by the application 1 via the shared apparatus, which will also prolong the processing time and decrease response speed.